.\" runargv0.8
.\" wcm, 2009.12.11 - 2012.03.05
.\" ===
.TH runargv0 8 "January 2013" "runtools-2.07" "runtools"
.SH NAME
runargv0 \- run a program with a different 0th argument
.SH SYNOPSIS
.B runargv0 [\-hV]
.I realprog alias
.B [
.I args ...
.B ]
.SH DESCRIPTION
.B runargv0
runs
.I realprog
with the 0th argument set to
.IR alias .
Any options and/or arguments for
.I realprog
may be given in
.IR args .
.PP
If
.I realprog
does not contain a ``/'' slash character,
.B runargv0
will perform a shell-like search for the executable using the
.B PATH
variable in the current environment.
.SH OPTIONS
.TP
.B \-h
Help.
Print a brief usage message to stderr and exit.
.TP
.B \-V
Version.
Print the version number to stderr and exit.
.SH EXIT STATUS
.B runargv0
exits with one of the following values:
.TP
0
.I realprog
was invoked and completed successfully.
In this case,
the exit code is returned by the
.IR program ,
rather than by
.B runargv0
itself.
.TP
100
.B runargv0
failed because of a usage error,
such as an invalid command\-line option or argument.
In this case,
.B runargv0
prints a brief error message and usage help to stderr on exit.
.TP
111
.B runargv0
failed due to some system or resource error.
In this case,
.B runargv0
prints a brief diagnostic message to stderr on exit.
.TP
1\-127
.I program
was invoked and failed with its own non-zero exit status.
.SH AUTHOR
Wayne Marshall, http://b0llix.net/perp/
.SH SEE ALSO
.nh
.BR runtools_intro (8),
.BR runargs (8),
.BR runchoom (8),
.BR rundetach (8),
.BR rundeux (8),
.BR runenv (8),
.BR runfile (8),
.BR runlimit (8),
.BR runlock (8),
.BR runpause (8),
.BR runsession (8),
.BR runtool (8),
.BR runtrap (8),
.BR runuid (8)
.\" EOF
